<html><!-- InstanceBegin template="/Templates/_Admin_Template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>TCedit 测试用例编写工具 - 产品管理</title>
<!-- InstanceEndEditable -->
<link rel="shortcut icon" href="favicon.ico">
<link href="/css/common.css" rel="stylesheet" type="text/css">
<script src="/js/prototype.js"></script>
<script src="/js/common.js"></script>
<script>
function doAction(action){
  if (action == "create") {
    document.formData.action = "/admin/product.jspx?action=create&page=${page}";
  } else if (action == "update") {
    document.formData.action = "/admin/product.jspx?action=update&id=${product.id}&page=${page}";
  } else if (action == "delete") {
    if(confirm("是否确定要删除？")) {
      document.formData.action = "/admin/product.jspx?action=delete&id=${product.id}&page=${page}";
      document.formData.submit();
    }
  }
}
</script>
<script>
function checkForm(){
	if($F("name")==""){
		alert("请输入“产品名称”！");
		return false;
	}

	return true;
}
</script>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>

<body>
<!-- InstanceBeginEditable name="MainContent" -->
<table width="99%" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="4" bgcolor="#dedeef"><b>产品信息</b></td>
        </tr>
        <tr>
          <td></td>
          <td>
            #if($error)
              <font color="#FF0000">$error</font>
            #end
          </td>
        </tr>
        <form action="" method="post" enctype="multipart/form-data" name="formData" id="formData" onSubmit="return checkForm()">
        <tr>
          <td width="15%" align="right">产品名称：</td>
          <td width="85%"><input name="name" type="text" class="text" id="name" maxlength="50" value="$!{product.name}" /> <b><font color="#FF0000">*</font></b></td>
        </tr>
        <tr>
          <td align="right">产品描述：</td>
          <td><input name="describing" type="text" class="text" id="describing" style="width:250px;" maxlength="100" value="$!{product.describing}" /></td>
        </tr>
        <tr>
          <td align="right"></td>
          <td><input name="locked" type="checkbox" id="locked" value="true" #if($product.locked) checked #end>锁定此产品</input></td>
        </tr>
        <tr>
          <td><BR></td>
          <td></td>
        </tr>
        <tr>
          <td></td>
          <td>
            #if($action=="" || $action=="create")
              <input name="SubmitCreate" type="submit" class="button" id="SubmitCreate" value="新增" onClick="doAction('create')" />
            #else
              #if (!($action=="delete"))
                <input name="SubmitUpdate" type="submit" class="button" id="SubmitUpdate" value="修改" onClick="doAction('update')" />
              #end
              <input name="SubmitDelete" type="button" class="button" id="SubmitDelete" value="删除" onClick="doAction('delete')" />
            #end
          </td>
          <td></td>
          <td></td>
        </tr>
        </form>
      </table>
    </td>
  </tr>
</table>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>